<?php
require_once 'function.php';
require_once 'lang/french.php';
require_once 'header.php';
// db
require_once '../conf/config.php';
require_once '../kernel/db/class_'. $basesql['type'] .'.php';
$db = new db_sql();
$connexion = $db->sql_connect($basesql);

if(isset($_POST['send']))
{
	unset($_POST['send']);
	$temp = array(
	'titre_site'	=>	$_POST['titre_site'],
	'keywords'	=>	$_POST['keywords'],
	'description_site'	=>	$_POST['description_site'],
	'annonce_par_page'	=>	'10',
	'contenue_accueil'	=>	base64_encode(''),
	'googlemap_key'	=>	'',
	'google_analytics'	=>	base64_encode(''),
	'google_identifiant_site'	=>	'',
	'email_contact'	=>	$_POST['email_contact'],
	'footer_text'	=>	base64_encode(''),
	'affiche_secteur_annonce'	=>	'0',
	'affiche_ville_annonce'	=>	'0',
	'theme'	=>	'',
	'dvlp_mod'	=>	'0',
	'map_accueil'	=>	'0',
	'url_rewrite'	=>	'0',
    'page_accueil'  =>  '',
    // Ajout 1.1.1
    'affiche_ville_annonce' =>  '0',
    'affiche_flux_annonce'  =>  '0',
    'log_identification'    =>  '1',
    'image_captcha_identification'  =>  '1',
    );
	$db->sql_query("UPDATE immo_config SET setting = '". serialize($temp) ."' WHERE module = 'generale'");
	redirect('page_fin_installation.php');
}
else
{
	echo '<h3>'. $lang['Preference_du_site'] .'</h3>
	<br /><br />
	<form method="post" action="page_config_site.php">
	<fieldset>
		<legend>'. $lang['Preference_du_site'] .'</legend>
		<br />
		<br />
		<table>
			<tr>
				<td><label>'. $lang['Titre'] .'</label></td>
				<td><input type="text" name="titre_site" /></td>
			</tr>
			<tr>
				<td><label>'. $lang['Mot_clef'] .'<small><em>'. $lang['separation_virgule'] .'</em></small></label></td>
				<td><input type="text" name="keywords" /></td>
			</tr>
			<tr>
				<td><label>'. $lang['Email_contact'] .'</label></td>
				<td><input type="text" name="email_contact" /></td>
			</tr>
			<tr>
				<td><label>'. $lang['Description_site'] .'</label></td>
				<td><textarea name="description_site" cols="60"></textarea></td>
			</tr>
		</table>
	</fieldset>
	<br />
	<br />
	<div style="text-align: center;"><input type="submit" name="send" style="background:url(\'images/bleu_suivant.png\'); height:48px; width:48px; border: none; cursor: pointer; " value=""/></div>
	</form>
	<br />
	<br />
	<div>'. $lang['Explication_configuration_site'] .'</div>';	
	
}
require_once 'footer.php';
?>